/**
 * JAVACC DEMO 1.0
 * @copy right dwusoft company All rights reserved. 
 * @Package com.zbxsoft.portal.enums  
 */
package com.dwusoft.platform.template;

import com.apache.tools.StrUtil;

/**
 * description:  信息发布枚举
 * @author Hou Dayu 创建时间：2015-8-29  
 * 
 */
public enum InfoMethodEnum {

	Add("R0001"), Edit("R0002"), Del("R0003"), List("R0004"), Pages("R0005"), Count("R0006"), View("R0007"), editNoticeStatus(
			"R0008"), Fsave("Fsave"), Fedit("Fedit"), Fdel("Fdel"), Flist("Flist"), Fpages("Fpages"), Fcount("Fcount"), Fview(
			"Fview"), Msave("Msave"), Medit("Medit"), Mdel("Mdel"), Mlist("Mlist"), Mpages("Mpages"), Mcount("Mcount"), Mview(
			"Mview"), Subsave("Ssave"), Subeidt("Sedit"), Subdel("Sdel"), Sublist("Slist"), Subpages("Spages"), Subcount(
			"Scount"), Subview("Sview"), Default("R000");

	private String name;

	private InfoMethodEnum(String name) {
		this.name = name;
	}

	// 普通方法  
	public static InfoMethodEnum getName(String name) {
		if (StrUtil.isNull(name))
			return Default;
		for (InfoMethodEnum c : InfoMethodEnum.values()) {
			if (c.getName().equals(name)) {
				return c;
			}
		}
		return Default;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
